<?php
/**
* TemplatePlazza Config File + Style Switcher
* TemplatePlazza.com 
**/
defined('_JEXEC') or die('Restricted access');

$superDefaultStyle 	= $this->params->get('templatestyle');  // Uncomment this line to de-activate website style switcher function
$superDefaultFontSize 	= $this->params->get('fontstyle'); // Uncomment this line to de-activate website style switcher function
$superDefaultFontType 	= $this->params->get('fontsize'); // Uncomment this line to de-activate website style switcher function


// comment these line below (d_fstyle, d_ftype, d_fsize) if you decide to use superDefault configuration above

$d_fstyle  = $this->params->get('templatestyle');  // Change this value from style1 to style12
$d_ftype 	= $this->params->get('fontstyle'); // arial | verdana | tahoma | trebuchet | georgia | optima | times
$d_fsize 	= $this->params->get('fontsize'); // standard | small | big

/////////////////DO NOT EDIT AFTER THIS LINE//////////////////////////////

$arrstyle 	= array("style1", "style2", "style3", "style4", "style5", "style6", "style7" );
$arrType 		= array("arial", "verdana", "tahoma", "trebuchet", "georgia","optima", "times");
$arrSize 		= array("small", "standard", "big");

if ($this->params->get('styleswitcherstate')==0) {
	$style = $superDefaultStyle;
} else {
	if(!empty($_GET['tpstyle'])) {
		if(in_array($_GET['tpstyle'],$arrstyle)) {
			setcookie('tp_fstyle', $_GET['tpstyle'] , time() + 3600, '/'); 
			$style = $_GET['tpstyle'];
		} else {
			$style = isset($_COOKIE['tp_fstyle']) ? $_COOKIE['tp_fstyle'] : $d_fstyle;
		}
	} else {
		$style = isset($_COOKIE['tp_fstyle']) ? $_COOKIE['tp_fstyle'] : $d_fstyle;
	}
}
if ($this->params->get('styleswitcherstate')==0) {
	$type = $superDefaultFontType;
} else {
	if(!empty($_GET['tptype'])) {
		if(in_array($_GET['tptype'],$arrType)) {
			setcookie('tp_ftype', $_GET['tptype'] , time() + 3600, '/'); 
			$type = $_GET['tptype'];
		} else {
			$type = isset($_COOKIE['tp_ftype']) ? $_COOKIE['tp_ftype'] : $d_ftype;
		}
	} else {
		$type = isset($_COOKIE['tp_ftype']) ? $_COOKIE['tp_ftype'] : $d_ftype;
	}
}
if ($this->params->get('styleswitcherstate')==0) {
	$size = $superDefaultFontSize;
} else {
	if(!empty($_GET['tpsize'])) {
		if(in_array($_GET['tpsize'],$arrSize)) {
			setcookie('tp_fsize', $_GET['tpsize'] , time() + 3600, '/'); 
			$size = $_GET['tpsize'];
		} else {
			$size = isset($_COOKIE['tp_fsize']) ? $_COOKIE['tp_fsize'] : $d_fsize;
		}
	} else {
		$size = isset($_COOKIE['tp_fsize']) ? $_COOKIE['tp_fsize'] : $d_fsize;
	}
}
?>
